#include<bits/stdc++.h>
using namespace std;
class Solution {
public:
    int singleNumber(vector<int>& nums) {
        unordered_map<int, int>count;
        for (int i : nums) {
            count[i]++;
        }
        for (auto e : count)
            if (e.second == 1)
                return e.first;
        return NULL;
    }
};